This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
~James Ekvelusonoopsi 11.Dec.03 12:14 AM a Web browser Domino Designer6.0.2All Platforms
I need to:
1] Get all entries in view in a remote DB "log.nsf", in the view called "archive"
2] Copy them to the Db where the agent is hosted called "archivedb.nsf"
3] Delete all entries and would love to then compact the "log" db.
My code works, but it takes forever ~45 Mins (I need to work with some BIG logs, my test log has 560 000 Doc's and is not Full Text Indexed - so I cannot use a search formula). Does anyone know of a more efficient way to code this? Any comments greatly appreciated! Please see my sample code below.
'View based Archiver
Sub Initialize
Dim session As New NotesSession
Dim thisdb As NotesDatabase
Dim thatdb As New NotesDatabase ( "", "log.nsf" )
Dim view As NotesView
Dim vc As NotesViewEntryCollection
Dim entry As NotesViewEntry
Dim doc As NotesDocument
Set thisdb = session.CurrentDatabase Set thatdb= session.GetDatabase ( "" , "log.nsf")
Set view = thatdb.GetView ("archive")
Set vc = view.AllEntries
Set entry = vc.GetFirstEntry ()
While Not (entry Is Nothing)
Set doc = entry.Document Set entry = vc.GetNextEntry (entry)
Call doc.CopyToDatabase (thisdb)
Call doc.remove (True)
Wend
End Sub